package cn.itcast.controller;

import cn.itcast.pojo.Result;
import cn.itcast.service.logService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    private cn.itcast.service.logService logService;
    @GetMapping("/page")
    public Result selectByPage(
            @RequestParam(defaultValue = "1") Integer page,
            @RequestParam(defaultValue = "10") Integer pageSize
    ) {

        return logService.selectByPage(page,pageSize);
    }
}
